package io.github.wanggit.antrpc.console.test;

import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.stereotype.Component;

@Component
public class MySpringApplicationRunListener implements SpringApplicationRunListener {

    @Override
    public void starting() {
        System.out.println("----------------------------starting----------------");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void environmentPrepared(ConfigurableEnvironment environment) {
        System.out.println("----------------------------environmentPrepared----------------");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
